package com.losenote.web.control;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import com.losenote.base.util.LogUtil;

/**
 * 首页，指向默认首页页面
 * 
 * @author danjingyu
 * @version $Id: IndexController.java, v 0.1 2013-5-11 下午4:55:15 danjingyu Exp $
 */
@Controller
@RequestMapping("/index.htm")
public class IndexController {

	private Logger logger = Logger.getLogger(IndexController.class);

	@RequestMapping(method = RequestMethod.GET)
	public ModelAndView handleRequest(HttpServletRequest httpservletrequest,
			HttpServletResponse httpservletresponse, ModelMap modelMap)
			throws Exception {
		ModelAndView view = new ModelAndView("home/index");
		LogUtil.info(logger, "用户登录");
		modelMap.put("msg", "Hello World!");
		return view;
	}

}
